<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>分页</title>
    <!-- 引入 Bootstrap 的 CSS 文件 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div th:fragment="pagination">
    	<div class="container mt-4">
	        <ul class="pagination">
	            <li th:class="${orders.first ? 'page-item  disabled' : 'page-item'}">
	                <a th:class="page-link" th:href="@{/orders(page=1, size=${orders.size})}">&laquo;</a>
	            </li>
	            <li th:class="${orders.first ? 'page-item disabled' : 'page-item'}">
	                <a th:class="page-link" th:href="@{/orders(page=${orders.number - 1}, size=${orders.size})}">&lsaquo;</a>
	            </li>
	            <li th:class="${orders.last ? 'page-item disabled' : 'page-item'}">
	                <a th:class="page-link" th:href="@{/orders(page=${orders.number + 1}, size=${orders.size})}">&rsaquo;</a>
	            </li>
	            <li th:class="${orders.last ? 'page-item disabled' : 'page-item'}">
	                <a th:class="page-link" th:href="@{/orders(page=${orders.totalPages}, size=${orders.size})}">&raquo;</a>
	            </li>
	        </ul>
	      </div>
    </div>
</body>
</html>
